<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="../include/taglib.jsp"%>
<%@ page import = "java.util.*" %>
<%@ page import = "com.sinodata.bsm.common.constants.RelationConstants" %>
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragrma","no-cache");
response.setDateHeader("Expires",0);
Boolean multiple  = (Boolean)request.getAttribute("multiple");
%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>资源组树</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>    
  <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery/jquery-1.7.1.min.js"></script>
    <%@ include file="../include/tree.jsp"%>
   	<link rel="stylesheet" media="all" type="text/css" href="${pageContext.request.contextPath}/style/default/tree/zTreeStyle.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/tree/jquery.ztree.all-3.1.min.js"></script>

	<script type=text/javascript>
			var isMultiple = '<%=multiple%>';
			function configTree() {
				var setting = null;
				setting = {
				async : {
					enable : true,
					url : "${pageContext.request.contextPath}/resource/res-select-tree.action",
					dataType : "text",
					autoParam : ["id"]
				},
				showTitle :true,
				view : {
					showLine : true,
					expandSpeed : ""
				},
				check: {
					enable:  isMultiple=='true' ? true : false,
					chkboxType:{ "Y" : "", "N" : "" }
				},
				callback : {
					onClick : function(event, treeId, treeNode) {
					
					}
				}
			};
			return setting;
		}
		getGroupTree = function(){
			return 	$.fn.zTree.getZTreeObj("groupTree");
		}
		$(document).ready(function() {
			$.fn.zTree.init($("#groupTree"), configTree());
		});
	</script>
  </head>
  <body>

	  <ul id="groupTree" class="ztree"></ul>

  </body>
</html>
